@use '@scss/common.scss' as *;

.bgFull {
  position: absolute;
  left: 0;
  top: calc(0px - var(--header-height) - 1px);
  width: 100%;
  height: calc(100% + var(--header-height) + 1px);
  z-index: 0;

  & div {
    @include mid-break {
      height: 100%;
    }
  }

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    @include small-break {
      height: unset;
    }
  }
}

.desktopBg {
  display: block;

  @include small-break {
    display: none;
  }
}

.mobileBg {
  display: none;

  @include small-break {
    display: block;
  }
}

.homeHero {
  position: relative;
  padding-top: 3rem;

  @include mid-break {
    padding-top: 0;
  }
}

.background {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;

  img {
    object-fit: cover;
    width: 100%;
  }

  @include mid-break {
    display: none;
  }
}

.imagesContainerWrapper {
  position: relative;
  height: 100%;
}

.laptopMedia {
  width: 100%;
  position: absolute;
  bottom: 0;
  z-index: 1;

  @include mid-break {
    left: calc(-1 * 10rem);
    width: calc(100% + 10rem);
  }

  @include small-break {
    left: -6rem;
    width: calc(100% + 8rem);
  }
}

.pedestalMaskedImage {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  mask-image: url('/images/pedestal-mask.svg');
  mask-mode: alpha;
  mask-size: cover;
  mask-position: center;
  mask-repeat: no-repeat;
  z-index: 2;

  @include mid-break {
    left: calc(-1 * 10rem);
    width: calc(100% + 10rem);
  }

  @include small-break {
    left: -6rem;
    width: calc(100% + 8rem);
  }
}

.featureVideoMask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  mask-image: url('/images/screen-mask.svg');
  mask-mode: alpha;
  mask-size: cover;
  mask-position: center;
  mask-repeat: no-repeat;
  z-index: 0;
  background: var(--color-base-1000);

  video {
    transform: rotate(-8deg) skew(-8deg) scale(0.42, 0.455) translate(40%, -38.5%);
    background: var(--color-base-1000);
  }

  @include mid-break {
    left: calc(-1 * 10rem);
    width: calc(100% + 10rem);
  }

  @include small-break {
    left: -6rem;
    width: calc(100% + 8rem);
  }
}

.contentWrapper {
  padding-top: calc(1971 / 2560 * 100%);

  @include mid-break {
    padding-top: unset;
  }
}

.content {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-top: 7rem;

  @include extra-large-break {
    padding-top: 8rem;
  }

  @include large-mid-break {
    padding-top: 7.5rem;
  }

  @include mid-plus-break {
    padding-top: 6.5rem;
  }

  @include mid-break {
    padding-top: 2rem;
  }

  @include small-break {
    padding-top: 1rem;
  }

  @include mid-break {
    position: unset;
    top: unset;
  }
}

.primaryContentWrap {
  display: flex;
  align-items: flex-start;
}

.primaryContent {
  position: relative;
  z-index: 2;
  grid-template-rows: auto min-content;

  @include mid-break {
    margin-top: 1rem;
  }
}

.secondaryContentWrap {
  position: relative;
  z-index: 2;
  align-items: center;
  width: 100%;

  @include mid-break {
    margin-top: -12rem;
  }

  @include small-break {
    margin-top: -10rem;
  }

  @include extra-small-break {
    margin-top: -8rem;
  }
}

.mobileSecondaryBackgroundGrid {
  display: none;

  @include mid-break {
    display: grid;
    width: 100%;
    left: 0;
  }
}

.mobileSecondaryBackground {
  display: none;

  @include mid-break {
    display: block;
    position: absolute;
    top: 0;
    left: calc(var(--gutter-h) * -1);
    height: 100%;
    width: calc(100% + (var(--gutter-h) * 2));
    background: linear-gradient(to top, rgba(0, 0, 0) 0%, rgba(0, 0, 0) 90%, rgba(0, 0, 0, 0) 100%);
    z-index: -1;
  }
}

.secondaryContent {
  @include mid-break {
    order: 1;
    z-index: 1;
    margin-top: 3rem;
  }
}

.logoWrapper {
  @include mid-break {
    order: 0;
  }
}

@keyframes spin {
  0% {
    left: calc(0% - 1rem);
    transform: rotate(0deg);
  }

  25% {
    left: calc(0% - 1rem);
    transform: rotate(180deg);
  }

  50% {
    left: calc(-100% + 1rem);
    transform: rotate(180deg);
  }
  75% {
    left: calc(-100% + 1rem);
    transform: rotate(360deg);
  }
  100% {
    left: calc(0% - 1rem);
    transform: rotate(360deg);
  }
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(1rem);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.announcementLink {
  display: inline-block;
  position: relative;
  padding: 1px;
  margin-bottom: 2rem;
  border-radius: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease-out;
  box-shadow: 0 0.25rem 1rem -0.75rem var(--theme-success-250);
  animation: fade-in-up 1s ease-out forwards;
  opacity: 0;
  transform: translateY(1rem);
  animation-delay: 1s;

  @include mid-break {
    margin-bottom: 0;
  }

  &::before {
    content: '';
    display: block;
    width: 200%;
    height: auto;
    aspect-ratio: 1;
    position: absolute;
    margin: 0;
    background-image: conic-gradient(
      var(--theme-success-150),
      var(--theme-success-150) 70%,
      var(--theme-success-250) 80%,
      var(--theme-elevation-750)
    );
    animation: spin 10s linear infinite;
    transform-origin: center;
    z-index: -1;
    translate: 0 calc(-50% + 1rem);
    opacity: 0.5;
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  }

  &:hover {
    box-shadow: 0 0.25rem 1rem var(--theme-success-100);

    &::before {
      opacity: 1;
    }
  }

  a {
    @include small;
    & {
      font-size: 16px;
      border-bottom: none;
      display: inline-flex;
      text-decoration: none;
      cursor: pointer;
      transition: color 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
      position: relative;
      color: var(--theme-elevation-750);
      padding: 0.375rem 0.75rem;
      background-color: var(--theme-success-50);
      border-radius: calc(0.5rem - 1px);
      z-index: 1;
    }

    &:hover {
      color: var(--theme-elevation-1000);
    }

    &::after {
      content: url('/images/link-arrow.svg');
      margin-left: 0.5rem;
    }

    &:hover,
    &:focus {
      opacity: 1;
    }
  }
}

.richTextHeading {
  margin-bottom: 2rem;

  * + h1 {
    margin-top: 0;
  }

  @include extra-large-break {
    h1 {
      font-size: 3rem;
    }
  }

  @include mid-plus-break {
    h1 {
      font-size: 2.5rem;
    }
  }

  @include mid-break {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;

    h1 {
      font-size: 3rem;
    }
  }
}

.secondaryRichTextHeading {
  margin-bottom: 1.5rem;

  h2 {
    @include h3;
  }
}

.richTextHeading,
.secondaryRichTextHeading {
  max-width: 75%;

  @include mid-break {
    max-width: 100%;
  }
}

.richTextDescription,
.secondaryRichTextDescription {
  max-width: 50%;
  margin-bottom: 2rem;

  @include mid-break {
    max-width: 100%;
  }
}

.primaryButtons,
.secondaryButtons {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 50%;

  @include mid-break {
    max-width: 100%;
  }
}

.primaryButtons {
  @include mid-break {
    margin-bottom: 2rem;
  }
}

.mobileMediaWrapper {
  display: none;

  @include mid-break {
    display: block;
    position: relative;
    overflow: hidden;
    width: calc(100% + (var(--gutter-h) * 2));
    left: calc(var(--gutter-h) * -1);

    img,
    video {
      height: 100%;
    }
  }
}

.mobilePedestalBackgroundGrid {
  @include mid-break {
    left: calc(10rem + var(--gutter-h));
    width: calc((100% - 10rem) - var(--gutter-h) * 2);
  }

  @include small-break {
    left: calc(6rem + var(--gutter-h));
    width: calc((100% - 8rem) - var(--gutter-h) * 2);
  }
}

.paddingBottom {
  position: relative;
  background: var(--color-base-1000);
  margin-top: -1px;
  height: var(--wrapper-padding-bottom);
}
